package old_engine;

public class Background {
	//bgX, bgY coordinates of the upper left corner
	private int bgX, bgY, speedY;
	private int gameHeight, gameWidth;
	
	public Background(int x, int y, Game game){
		bgX = x;
		bgY = y;
		speedY = (int)game.getGameSpeed();
		gameHeight = game.getHeight();
		gameWidth = game.getWidth();
	}
	
	public void update(){ //image dimensions 2160 x 480
		 //this will change the bgX by the speed in the x direction
		bgY += speedY;
		if(bgY>=gameHeight){
			bgY = -gameHeight; 
		}
		
	}

	public int getBgX() {
		return bgX;
	}

	public int getBgY() {
		return bgY;
	}

	public int getSpeedY() {
		return speedY;
	}

	public void setBgX(int bgX) {
		this.bgX = bgX;
	}

	public void setBgY(int bgY) {
		this.bgY = bgY;
	}

	public void setSpeedY(int speedX) {
		this.speedY = speedX;
	}
	
	
	
}
